package com.ktwlsoft.fundmanage.domain.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * 买方卖方银行设置
 *
 * @author Name on 2019/9/4 15:35
 * @version 1.0
 */
@Entity
@Setter
@Getter
@ApiModel("买方卖方银行设置-RelationalPersonBank")
public class RelationalPersonBank extends BaseEntity{

    /**主键*/
    @ApiModelProperty("主键")
    @Id
    @Column(name = "id",columnDefinition = "bigint(30) NOT NULL COMMENT '主键'")
    private Long id;

    /**交易编号*/
    @ApiModelProperty("交易编号")
    private Long tsCode;

    /**房屋关系人id*/
    @ApiModelProperty("房屋关系人id")
    private Long relatedPersonId;

    /**开户银行*/
    @ApiModelProperty("开户银行")
    @Column(name = "open_account_bank",columnDefinition = "varchar(50) DEFAULT NULL COMMENT '开户银行'")
    private String openAccountBank;

    /**持卡人姓名*/
    @ApiModelProperty("持卡人姓名")
    @Column(name = "cardholder_name",columnDefinition = "varchar(40) DEFAULT NULL COMMENT '持卡人姓名'")
    private String cardholderName;

    /**银行卡号*/
    @ApiModelProperty("银行卡号")
    @Column(name = "bank_card_number",columnDefinition = "varchar(50) DEFAULT NULL COMMENT '银行卡号'")
    private String bankCardNumber;

    /**开户网点名称*/
    @ApiModelProperty("开户网点名称")
    @Column(name = "open_account_dot_name",columnDefinition = "varchar(300) DEFAULT NULL COMMENT '开户网点名称'")
    private String openAccountDotName;

    /**类型:SELLER.卖方,BUYER.买方*/
    @ApiModelProperty("类型:SELLER.卖方,BUYER.买方")
    @Column(name = "personnel_type",columnDefinition = "varchar(30) DEFAULT NULL COMMENT '类型:SELLER.卖方,BUYER.买方'")
    @Enumerated(EnumType.STRING)
    private HouseRelatedPerson.PersonnelType personnelType;

    /**是否在用*/
    @ApiModelProperty("是否在用")
    @Column(columnDefinition = "bit DEFAULT 0 COMMENT '是否在用'")
    private Boolean isUse;

    /**房屋关系人*/
    @ApiModelProperty("房屋关系人")
    @Transient
    private HouseRelatedPerson houseRelatedPerson;

    /**是否可修改*/
    @ApiModelProperty("是否可修改")
    @Transient
    private Boolean isUpdate;
}